約 1,193,220 件
https://w.atwiki.jp/wiki9_eroparo/pages/273.html
【学園】I s(アイズ)でエロパロ【ラブコメ】 http //sakura03.bbspink.com/test/read.cgi/eroparo/1138342504/ 種別/SS創作 分類/作品単独 検索ワード/桂正和
https://w.atwiki.jp/sakuyataityo/pages/468.html
, =ー-‐' / ,' _ -‐- 、 ヽ, Y´ r-、 ヽ ,ヽ _/テ Yリリリirリi |リリ|~´ V ヽリリi |ハ|_、!-ヤテ | )リi /| |ィチ, i `i |ヘリハ / イ ト、 __ | |リリトヘ それに、以前取り上げた斬刀を再度俺に渡すとは。 /. /リ iリリ 、 _ノj jリリリリヽ、 /i. /リヘ トリリリ) ト iト、リリヽーヽ=メゝ、 宇宙連邦の奴がこれを欲しがってたと聞いてたが。 { { タ ソ|-‐/ |リイj }ヽリ\ }リ) どうやって取り返した。 ヘ ィ´ Yi /ヽ /jリj j jリリリヽ.\ (´ (´ ヽi.リリ∧Y , iリ / jリリリリ ヘリ`ー-、 |リリ/ 〉} ,' リ/ jリリリリリリヘリリリリリヽ_ _ iリリj ; j ヘ,' メ/ jリリ、リ リリリヘ`ー- 、 _リヘ (iフヽリリj |. ; /\/リリハリ リリリリヘ_ ヽリ ヽiフヽ} j /ー/リリ/ リ リリリリリリ`i リ /ヽiフヽ j ! /ヽ./リリ/ 〉リリウネリリリヽ ' j.リリヽiフヽ、i ∧フリリリ (リリリリリリリリリリヽ /リリリリiヽiフ`//リリリ/_ , -‐リリリリリリリリリリリリヽ /リリリリiリ、//〆、ー-―´ヽリリリリリリリリリリリリリリ∧ /リリリリ i//〆ヽ,/ィ , _-‐ゝリリリリリリリリリリリリリリ /リリリリリ/ヽ_∨\ `´//ノノ´ iリヽリリリリリリリリリリリリリリリ /リリリリリ L/ヽ>ー--‐ヽミヽ∧iリ ヽリリリリリリリリリリリリリリ 長期休暇3日目あたりに初出。 分子結合を切断しあらゆる物体を切り裂く斬刀・「鈍」の持ち主。 既に住人のほとんどが荒廃した母星を見捨ていなくなった「コジョーゲ星」という出身星に一人で暮らしていた。 そこで斬刀を求めやってくる者たちを全て斬り殺した末賞金首となり、宇宙警察に捕まっていた。 宇宙警察の留置所に入っていたが、賞金首としての過去を消し去る事と斬刀の返還を条件に、 彼が「お嬢ちゃん」と呼ぶ何者かから坂田銀時とアンクの暗殺を頼まれている。 (銀閣曰く、銀閣による暗殺は保険としての一手らしい。) 4日目に坂田銀時の暗殺のためン・ガミオ・ゼダさんの店を強襲したが、 初撃はガミオさんに迎撃され、対峙してからは銀さんにほぼ同等の速度で迎撃されている。 (原作どおりの)奥義「斬刀狩り」をだすも、銀さんの気合の一閃に敗れた。 ガミオさんの雷撃で血止めを行われ一命は取り留めた模様。 その後ガミオさんがアーヴァロルの方に引き渡した。 斬刀自体は折れてしまったが…、密かにそれ☆びーが回収している。
https://w.atwiki.jp/langc/pages/22.html
update test -- test (2009-11-23 20 22 38) 名前 コメント Exercise 2-1.Write a program to determine the ranges of char , short , int , and long variables, both signed and unsigned , by printing appropriate values from standard headers and by direct computation. Harder if you compute them determine the ranges of the various floating-point types. #include stdio.h #include limits.h #include float.h int main(){ char a = 0; short c = 0; int e = 0; long g = 0L; int i; puts(" from limits.h "); printf("char_MAX %d, char_MIN %d¥n",CHAR_MAX,CHAR_MIN); printf("unsigned_char_MAX %u¥n", UCHAR_MAX); printf("int_MAX %d, int_MIN %d¥n",INT_MAX, INT_MIN); printf("unsgined_int_MAX %u¥n", UINT_MAX); printf("long_MAX %ld, long_MIN %ld¥n", LONG_MAX, LONG_MIN); printf("unsigned_LONG_MAX %lu¥n", ULONG_MAX); puts(" by computation "); printf("char_SIZE %d bit¥n", (int)sizeof(a) * 8 ); printf("char_MAX %d, char_MIN %d¥n", a | 0x7F, ~(a | 0x7F)); printf("unsigned_char_MAX %u¥n", a | 0xFF); printf("short_SIZE %d bit¥n", (int)sizeof(c) * 8); printf("short_MAX %d, short_MIN %d¥n", c | 0x7FFF, ~(c | 0x7FFF)); printf("unsigned_short_MAX %u¥n", c | 0xFFFF); printf("int_SIZE %d bit¥n", (int)sizeof(e) * 8 ); printf("int_MAX %d, int_MIN %d¥n", e | 0x7FFFFFFF, ~(e | 0x7FFFFFFF)); printf("unsgined_int_MAX %u¥n", e | 0xFFFFFFFF); printf("long_SIZE %d¥n", (int)sizeof(g) * 8); printf("long_MAX %ld, long_MIN %ld¥n", g | 0x7FFFFFFFFFFFFFFF, ~(g | 0x7FFFFFFFFFFFFFFF)); printf("unsignded_long_MAX %lu¥n", g | 0xFFFFFFFFFFFFFFFF); printf("float_MAX %e, float_MIN %e¥n", FLT_MAX, FLT_MIN); } Exercise 2-2.Write a loop equivalent to the for loop above without using or || . i = 0; while(1){ if(i = lim-1){ if((c = (getchar() != ¥n ){ if(c != EOF){ s[i++] = c; }else break; }else break; }else break; } Exercise 2-3.Write the function htoi(s) , which converts a string of hexadecimal digits (including an optional 0x or 0X) into its equivalent integer value. The allowable digits are 0 through 9, a through f, and A through F . #include stdio.h int htoi(char s[]){ int i; int result = 0; for(i = 2; s[i] != ¥0 ; i++){ if(s[i] = 0 || s[i] = 9 ){ result = 4; result += s[i] - 48; //printf("%d ¥n ", result); } else if(s[i] = a || s[i] = f || s[i] = A || s[i] = F ){ result = 4; switch(s[i]){ case a case A result += 10; break; case b case B result += 11; break; case c case C result += 12; break; case d case D result += 13; break; case e case E result += 14; break; case f case F result += 15; break; } } } return result; } int main(int argc, char *argv[]){ if(argc = 1){ puts("please input the hex-number with formatting 0x??, or 0X???"); exit(1); } if(argc != 2){ puts("too many argments"); exit(1); } if( argv[1][0] != 0 || (argv[1][1] != x argv[1][1] != X )){ puts("please input like follwing format. 0x??, or 0X??"); exit(1); } int result = htoi(argv[1]); printf("hex-num %s is converted to %d¥n", argv[1], result); } Exercise 2-4.Write an alternate version of squeeze(s1,s2) that deletes each character in the string s1 that matches any character in the string s2 . #include stdio.h char *squeeze(char s1[], char s2[]){ int i,j,k,l; for(i = 0; s2[i] != ¥0 ; i++){ k = 0; for(j = 0; s1[j] != ¥0 ; j++){ if( s1[j] != s2[i]){ s1[k++] = s1[j]; } else{ for(l = j; s1[l] != ¥0 ; l++){ s1[l] = s1[l+1]; } j--; } } } s1[k] = ¥0 ; return s1; } int main(int argc, char *argv[]){ if(argc = 1){ puts("please input like following format, ./a.out s1 s2 ,replace s1,s2 arbitrary"); exit(1); } if(argc = 4){ puts("too many arguments"); exit(1); } printf("your input ¥n s1 %s¥n s2 %s¥n", argv[1], argv[2]); char *result = squeeze(argv[1], argv[2]); printf("removed string %s ¥n", result); } Exercise 2-5.Write the function any(s1,s2) , which returns the first location in the string s1 where any character from the string s2 occurs, or -1 if s1 contains no characters from s2 . (The standard library function strpbrk does the same job but returns a pointer to the location.) #include stdio.h #define MAX_CHAR 10000 int any(char s1[], char s2[]){ int candidates[MAX_CHAR] = {0}; int i,j,k = 0,l; int first_check = 1; for(i = 0; s2[i] != ¥0 ; i++){ if(first_check){ for(j = 0; s1[j] != ¥0 ; j++){ if(s1[j] == s2[i]) candidates[k++] = j; } first_check--; candidates[k] = -1; } else for(j = 0; candidates[j] != -1; j++){ if(s1[candidates[j]+i] != s2[i]){ for(l = j; candidates[l] != -1; l++){ candidates[l] = candidates[l+1]; } j--; } } } return candidates[0]+1; } int main(int argc, char *argv[]){ int result; if(argc = 1){ puts("please input like following format, ./a.out s1 s2 ,replace s1,s2 arbitrary"); exit(1); } if(argc != 3){ puts("please input properly"); exit(1); } printf("your input ¥n s1 %s¥n s2 %s¥n", argv[1], argv[2]); if(result = any(argv[1], argv[2])) printf("the placee of the word you chosed %d ¥n", result); else puts("-1"); } Exercise 2-6.Write a function setbits(x,p,n,y) that returns x with the n bits that begin at position p set to the rightmost n bits of y, leaving the other bits unchanged. Exercise 2-7.Write a function invert(x,p,n) that returns x with the n bits that begin at position p inverted (i.e., 1 changed into 0 and vice versa), leaving the others unchanged. Exercise 2-8.Write a function rightrot(x,n) that returns the value of the integer x rotated to the right by n bit positions. Exercise 2-9.In a two s complement number system, x = (x-1) deletes the rightmost 1-bit in x . Explain why. Use this observation to write a faster version of bitcount . Exercise 2-10.Rewrite the function lower, which converts upper case letters to lower case, with a conditional expression instead of if-else .
https://w.atwiki.jp/yuyutoton/pages/4547.html
ロボパーツ一覧(五十音順) HD(ア行~ナ行 / ハ行~その他) BD(ア行~ナ行 / ハ行~その他) AM(ア行~ナ行 / ハ行~その他) BS(ア行~ナ行 / ハ行~その他) LG(ア行~ナ行 / ハ行~その他) HDJ AMJ BSJ LGJ コンバージョン 武器・その他 手持ち武器(メイン / サブ) 内蔵武器(メイン / サブ) 特殊効果付き(パーツ / 武器) チューニングパーツ AURAカートリッジ CミサイルガンType.I レビュー コメント CミサイルガンType.I スペック アイコン 系統 入手場所 入手方法 価格 ランク 階級制限 カスタマイズ特記事項 NO IMG 特殊系 マニモdeガチャSP(コラボ限定) - - R-5 なし なっちん系AMにのみ装備可能 ウェポン性能 Type 攻撃力 弾速 射程 EN消費 強化回数 スタック強化率 性質 CLUSTER MISSILE 物理275*1x14爆風100% 350 300 40 6 2.0% 特性 衝撃PVE威力補正 +0% サイズ 重量 装備条件 チャージ 発射間隔 リロード スタン率 ブレ PVP補正 L 25.0t 射撃110 0.3 0.3 0.5 0.3 静止中5移動中5 威力 -70%状態異常 +0% 爆風威力100% 必要安定 ? レビュー パトなっちんType.I初期装備。 2023年5月18日から実施のコラボイベント第2弾に合わせて実装された。 コズミックルネッサンス世界に飛ばされてきたマルチバースの「パトなっちん」と「菊理ナツキ警部補」がこちらの世界で出会った発明家「イルミス」の手により追加された武装。 なっちん系AMにのみ装備可能。 長所 短所 コメント 名前 コメント 誤りの指摘、追加情報など、このページの内容に関するコメントのみお願いします。 上記以外については質問雑談用ページの方でお願いします。
https://w.atwiki.jp/2chgoukemijikobousi/pages/6.html
=物質情報= 【物質名】 2C-I:2,5-dimethoxy-4-iodophenethylamine 【摂取量目安】 経口摂取 弱:5 - 15 mg 普:10 - 25 mg 強(危険):20 - 30 mg 【持続時間目安】 経口 6-10時間 【死亡事例の有無(分かる範囲で)】 【禁忌】 【参考リンク】 Erowid: ttp //www.erowid.org/chemicals/2ci/2ci.shtml ttp //www.erowid.org/library/books_online/pihkal/pihkal033.shtml 2C-Iの危険度査定についてのレポート(英文):ttp //www.erowid.org/chemicals/2ci/2ci_info1.shtml ※摂取量や持続時間はあくまで目安です。体重・精神及び肉体的な向き不向きがあります。 酒類・他の薬との併用は重大な事故を起こす可能性があります。
https://w.atwiki.jp/touhoukashi/pages/58.html
【登録タグ サークル 作C】 for the Lunatix Unlimited Spark! neetmania Ultra Cute!? Unconnected. Honey I Scream! RESetup; Samplejunk Hommaging Greats So Many Materials t&T. “tpz And TOUHOU” from 2005 http //c-h-s.me/
https://w.atwiki.jp/aniwotawiki/pages/8729.html
登録日:2011/11/03 Thu 22 44 57 更新日:2024/04/11 Thu 19 14 42NEW! 所要時間:約 7 分で読めます ▽タグ一覧 LastLivingL.S.I. NEC SHARP パソコン マイコン ロボット 大艦巨砲 媒体不明 富士通 川上稔 旧世代 極東 自動人形 /*************************** /*Number of file 0 /*************************** /*――――――――――――― /*●前文 /*――――――――――――― 人は神によって大地から作られ 人は大地を覆い 人は幾多の戦いを経ることで繋がりを得た ならば 人の手によって大地から作られたものは どうなっていくのか 川上稔原作のストーリー。 川上稔の作品群はそのほとんどが〈都市世界〉と呼ばれる一連の世界観の歴史上における出来事であるが、これは〈都市世界〉とは一切関係ない珍しい作品。とはいえ、自動人形を初め一部のガジェットは多作品と共通のモノとなっている。 企画が始まったのは2007年頃だが、原案自体は10年以上前には出来ていたらしい。 内容的には、パソコン黎明期における企業間の販売競争をベースとした自動人形達の戦争モノ。 キャラクターは全てパソコン、マイコンをベースとしているため、その時代の人ならばにやりと出来るかもしれない。 公式での略称はL3。 □ストーリー ストーリーは大まかに3部に分かれ、それぞれ 国内戦域編 太平洋上戦域編 “LastLivingL.S.I.”編 となっている。 舞台は極東。 民生用の自動人形(L.S.I.)を製造を主務とするN.E.C.(NeoEmpireComputer)、FUJI-2、S-Harpの三つの企業体は、製造したL.S.I.を企業間抗争に用い、毎日楽しくドンパチやっていました。 ところがそんなある日、異変がおきます。今まで様子見をしていた海外企業が極東に本格参戦。抗争は大規模化してさぁ大変。 三つの企業体はとりあえず協力して海外企業を撃退しようとしますが、企業体の内、N.E.Cの主力L.S.I.とFUJI-2の最新型L.S.I.はOSが海外製であり、一気に窮地に追い込まれます。 残ったS-Harpは自前のOSを使用した“68系”をチューンしまくってなんとか戦域を保ち、危機を脱します。 そんなこんなで海外企業との抗争も一段落。いわゆる膠着状態になってしまったわけですが、海外に対し膠着とか滅亡ルートまっしぐらに決まってます。 なんとか膠着状態を脱しようと、極東の全L.S.I.を総動員し、シリコンバレー地下6000kmに存在する全L.S.I.の母、ENIACを撃沈するための作戦、通称“LastLivingL.S.I.”を開始することになるのですが……? □登場するL.S.I. ○N.E.C.製 PC8001型 N.E.C初の自動人形。生産性を高めるため、耳無しかつ人差し指から薬指までの長さが同じという驚異のデフォルメ使用。 原作者のキャライメージは「教育係のおねーさん」or「親しい友人」。 全体的に白っぽい。 PC6001型 8001開発陣が“家庭用”を主眼に製作した機体。急造であったため、造りは甘いがデザインは実験的にいろいれつけられた。耳は有る。 原作者のキャライメージは「保母さん系」 PC6001Mk-2型 6001の後継機にして、N.E.C初の後継機。6001ね足りない部分を補うために作られた。このあたりから戦闘用を視野に入れたデザインとなっている。 キャライメージは「小学校の先生」or「先生の助手」 PC9801型 万能機の試作機。基本的には88型とあまり変わらないが、後の主力となるためね拡張性の高い機体。万能機を目指したため、出力も高い。このあたりから完全に“戦闘用”を意識しはじめる。 背部にはサブPCがついており、将来的には飛行用のブースターへとなる予定であった。 8801mk-ⅡSR型 御三家の一つ。背部に実験的に短期出力バーニアを搭載しており、移動力強化及び超短時間の飛行が可能となった。 PC88MC型 PC88AV改改型 対シリコンバレー用超巨大機その1。68K-XVIがベース。 役割は地上要塞っあり、浮遊機能は無し。百足脚でキリキリ動く。最期はバリケード変わりに。哀れ。 ○FUJI-2製 FM-7型 低価格。全体的に柔和なイメージ。服(外装)がやや和服っぽい。 曰く、クセはあるが性能は良い、とのこと。 キャライメージは「家庭におけるハウスキーパー」 FM-77AV型 御三家の一つ。短期航空戦及び地上戦を行える万能機体。ただ、ソフト面が弱く、動態より静態の把握に優れるため、狙撃が得意という謎試用。ソフトの弱さが尾を引き、後に家庭用へシフト。 FM-TOWNS型 FM-TOWNS改型 対シリコンバレー用の超巨大機その2。FM-TOWNSをベースにフォートレスパーツをつけられている。 重力制御による浮遊タイプ。 現場指揮と砲撃を担当したが、一機としてシリコンバレーから帰還することは無かった。 ○S-Harp製 MZ-80K型 S-Harpの名機。他の二社に比べ、鋭角的なデザインが特徴。外装はワンピース+スカートだが、S-Harpは後に侍女服型へとシフトしていく。 キャライメージは「先端トガリ系」 X-1turbo型 御三家の一つ。前身となるX-1が不備だらけで、それを見直す形で作られたモノであるため、これをX-1とする人もいるとか。 この辺から侍女化してきた。 X68000Ace型 68K-XVI型 68K-XVI改型 対シリコンバレー用超巨大機その3。決戦艦で、対シリコンバレー用の中で最も高攻撃力。 三機のみロールアウトし、マブラヴよろしく全地上部隊の陽動を使用し、大陸間弾道弾でENIAC排熱路に突入した。 明確な主役のいない今作で唯一明言されている“主役機” ○海外製 Apple2c型 海の向こうの“新大陸”におけるホビー用主力機。非戦闘用で全長150センチ程度。 全体的に銀っぽい。 PV-7型 安定した機体。全体的に部品を削った簡素な造りをしている。が、部品削ったためやっぱ性能は低い。ドッキングステーションで拡張性を補う AT互換型 AMIGA1200型 AMIGA4000改 対シリコンバレー用超巨大機のカウンター。バーニアによる浮遊型で、ファンネル装備。 ENIAC 第二次大戦中に開発された自動人形。現代における全ての自動人形の母。 ENIAC以前にも自動人形自体は作られていたが、彼女が“母”と呼ばれるのには理由がある。 元来、自動人形の頭脳は人を模して作られていたが、完成度は低く人とは程遠いものだった。 人に比べ判断が性急かつ硬直傾向……要するに、融通が利かない石頭なモノになのだ。 しかしこれは判断、計算が早く、情報処理の一点に関して言えば、人間を遥かに凌駕する頭脳をもっているということであり、それ故自動人形は主にその情報処理能力を強化され、艦船や大型航空機の制御を担当していた。 第二次大戦中もその立ち位置は変わらずであったが、終戦間際、彼女が作り出されるられる事により自動人形は大きな転換点を迎える。 旧来の自動人形が“人を模し、人を目指した”ものであったのに対し、彼女……ENIACは一から“自動人形であることを目指して”作られたのだ。 これにより、今までの“人を模した人形としての”自動人形から完全に人と決裂した“種族としての”自動人形が生まれる事になる。 現在のスタンダードである“種族としての”自動人形は電子型頭脳の自動人形と呼ばれ、そして世界で最初の電子型頭脳の自動人形である彼女は“母”と呼ばれるに至った。 因みに、L.S.I.の名もここから来ており、電子型頭脳の自動人形は“Large Silicon Intelligence” を略し、L.S.I.と呼ばれている。 尚、彼女は第二次大戦終了と共に廃棄される予定であったが、その功績が認められ、米国の地下深くに凍結されている。 とまぁここまで書いていてアレだがぶっちゃけコレ、没作品である。 が、pixivに一応設定画が上がっている他、11/03に開催された同人誌即売会でも、設定原画集が発売された。 以前はそれしか入手ルートが無かったが、TENKYのサイト復活に伴い通販も開始したため興味があればそちらから。 追記・修正頼みます。 △メニュー 項目変更 この項目が面白かったなら……\ポチッと/ -アニヲタWiki- ▷ コメント欄 [部分編集] 名前 コメント
https://w.atwiki.jp/hmiku/pages/9892.html
【登録タグ C マイゴッドP 初音ミク 曲】 作詞:マイゴッドP 作曲:マイゴッドP 編曲:マイゴッドP 唄:初音ミク 曲紹介 タイトルは「CACOPHONY SLAVE IMPERFECT CONSONANCES」(カコフォニー:スレイブ:インパーフェクト・コンソーナンス)の略。 歌詞 無知は知である。 沈黙は、時として弁論に勝る。 しかして概ね、必要とされるのは言葉である。 「それじゃあ、君に。」 甲は感情の集約物であり、乙は記号の集合体である。 丙は圧縮された無意識であり、丁は変換された自意識である。 つまるところ、なんぞや? あはは、あはは。わらっちゃうわ。 子供の遊びは子守唄。潰して色付く断末魔。 道行く行列、線を差す。座して祀るは祟り神。 詰らぬ恨みを抱えては、東風吹く庵の梅掻喧。 黄泉の逢坂けふ越えて、吾身も無いまま出でしかな。 子供の遊びは童歌。披いて花咲く終末期。 道程亢進、線を差す。座して待つるはねえやの最期。 詰らぬ怨みを抱えては、手力要らずの梅掻喧。 宵の遠坂けふ越えて、吾身も無いままふるさとへ。 じゃあね、おまえさん。いきていたら、またあいましょう。 コメント 名前 コメント
https://w.atwiki.jp/langc/pages/19.html
you made it. -- ushiku (2009-11-20 16 53 01) 名前 コメント Exercise 1-1. Run the ``hello, world program on your system. Experiment with leaving out parts of the program, to see what error messages you get. #include stdio.h main(){printf("hello, ");printf("world");printf("\n");} Exercise 1-2. Experiment to find out what happens when printf s argument string contains \c, where c is some character not listed above. #include stdio.h main(){ printf("hello\c, wo\cl\cd\c\n"); return 0;} Exercise 1-3. Modify the temperature conversion program to print a heading above the table. #include stdio.h #include stdlib.h int main(){ float fahr, celsius; int lower, upper, step; lower = 0; upper = 300; step = 20; fahr = lower; printf("fahr celsius\n"); while(fahr = upper) { celsius = (5.0/9.0) * (fahr-32.0); printf("%3.0f %6.1f\n", fahr, celsius); fahr = fahr + step; } return 0;} Exercise 1-4. Write a program to print the corresponding Celsius to Fahrenheit table. #include stdio.h #include stdlib.h int main(){ float fahr, celsius; int lower, upper, step; lower = -20; upper = 150; step = 20; printf("celsius fahr\n"); celsius = lower; while(celsius = upper) { fahr = (9.0/5.0)*celsius + 32.0; printf("%6.1f %3.0f\n", celsius, fahr); celsius = celsius + step; } return 0;} Exercise 1-5. Modify the temperature conversion program to print the table in reverse order, that is, from 300 degrees to 0. #include stdio.h #include stdlib.h int pr1_5(){ float fahr, celsius; int lower, upper, step; lower = 0; upper = 300; step = 20; fahr = upper; printf("fahr celsius\n"); while(lower = fahr) { celsius = (5.0/9.0) * (fahr-32.0); printf("%3.0f %6.1f\n", fahr, celsius); fahr = fahr - step; } return 0;} Exercise 1-6. Verify that the expression getchar() != EOF is 0 or 1. #include stdio.h #include stdlib.h int pr1_6() { int c; while(1) printf("%d\n", getchar() != EOF); return 0;} Exercise 1-7. Write a program to print the value of EOF. #include stdio.h #include stdlib.h int pr1_7(){ printf("%d\n", EOF); return 0;} Exercise 1-8. Write a program to count blanks, tabs, and newlines. #include stdio.h #include stdlib.h int pr1_8(){ int c, nl; int nTab, nSpace; nl = 0; nSpace = 0; nTab = 0; while((c = getchar()) != EOF) { if(c == \n ) ++nl; if(c == ) ++nSpace; if(c == \t ) ++nTab; } printf("number of line %d\n", nl); printf("number of space %d\n", nSpace); printf("number of tab %d\n", nTab); return 0;} Exercise 1-9. Write a program to copy its input to its output, replacing each string of one or more blanks by a single blank. #include stdio.h #include stdlib.h int pr1_9(){ int c; while((c = getchar()) != EOF) if(c == ) { while((c = getchar()) == ) ; ungetc(c, stdin); putchar( ); } else putchar(c); return 0;} Exercise 1-10. Write a program to copy its input to its output, replacing each tab by \t, each backspace by \b,and each backslash by \\. This makes tabs and backspaces visible in an unambiguous way. #include stdio.h #include stdlib.h int pr1_10(){ int c; while((c = getchar()) != EOF) { if(c == \t ) printf("\\t"); else if (c == \b ) printf("\\b"); else if (c == \\ ) printf("\\\\"); else putchar(c); } return 0;} Exercise 1-11. How would you test the word count program? What kinds of input are most likely to uncover bugs if there are any? #include stdio.h #include stdlib.h #define IN 1#define OUT 0 int pr1_11(){ int c, nl, nw, nc, state; state = OUT; nl = nw = nc = 0; while((c = getchar()) != EOF) { ++nc; if(c == \n ) ++nl; if(c == || c == \n || c == \t ) state = OUT; else if (state == OUT) { state = IN; ++nw; } } printf("nl %d nw %d nc %d\n", nl, nw, nc); return 0;} Exercise 1-12. Write a program that prints its input one word per line. #include stdio.h #include stdlib.h enum { IN = 1, OUT = 0}; int pr1_12(){ int c, nl, nw, nc, state; state = OUT; nl = nw = nc = 0; while((c = getchar()) != EOF) { ++nc; if(c == \n ) ++nl; if(c == || c == \n || c == \t ) { state = OUT; printf("\n"); } else { putchar(c); if(state == OUT) { state = IN; ++nw; } } } printf("nl %d nw %d nc %d\n", nl, nw, nc); return 0;} Exercise 1-13. Write a program to print a histogram of the lengths of words in its input. It is easy to draw the histogram with the bars horizontal; a vertical orientation is more challenging. #include stdio.h #include stdlib.h enum { IN = 1, OUT = 0}; void printStar(int num); int pr1_13(){ int c, nl, nw, nc, state; int sw; int nWordCount[100]; int i; for(i = 0; i 10; i++) nWordCount[i] = 0; state = OUT; nl = nw = nc = 0; sw = 0; //start word while((c = getchar()) != EOF) { ++nc; if(c == \n ) ++nl; if(c == || c == \n || c == \t ) { state = OUT; nWordCount[nc-sw]++; } else if (state == OUT) { state = IN; sw = nc; ++nw; } } printf("nl %d nw %d nc %d\n", nl, nw, nc); for(i = 0; i 10; i++) { printf("[%d] ", i); printStar(nWordCount[i]); } return 0;} void printStar(int num){ int i; for(i = 0; i num; i++) printf("*"); printf("\n");} Exercise 1-14. Write a program to print a histogram of the frequencies of different characters in its input. ginclude stdio.h #include string.h enum { MAX_BUFF = 128 }; int printHist(int *histArray, int n){ int ch,j; for(ch = ; ch n; ch++) { printf("%c ", ch); for(j = 0; j histArray[ch]; j++) printf("*"); printf("\n"); } return 0;} int pr1_14(){ int ch,i; int buffer[MAX_BUFF]; for(i = 0; i MAX_BUFF; i++) buffer[i] = 0; while((ch = getchar()) != EOF) { buffer[ch]++; } printHist(buffer, MAX_BUFF); return 0;} Exercise 1-15. Rewrite the temperature conversion program of Section 1.2 to use a function for conversion. #include stdio.h int conversionTemperature(int fahr){ return 5 * (fahr-32) / 9;} int pr1_15(){ int fahr, celsius; int lower, upper, step; lower = 0; upper = 300; step = 20; fahr = lower; while(fahr = upper) { celsius = conversionTemperature(fahr); printf("%d\t%d\n", fahr, celsius); fahr = fahr + step; }} Exercise 1-16. Revise the main routine of the longest-line program so it will correctly print the length of arbitrary long input lines, and as much as possible of the text. #include stdio.h #define MAXLINE 1000 int getline(char line[], int maxline);void copy(char to[], char from[]); int pr1_16(){ int len,index; int arbitaryLenth; char line[MAXLINE]; char longest[MAXLINE][MAXLINE] = {NULL}; int i; index = 0; arbitaryLenth = 0; printf("input arbitaryLength "); scanf("%d ", arbitaryLenth); while((len = getline(line, MAXLINE)) 0) if(len == arbitaryLenth) { copy(longest[index], line); index++; } for(i = 0; i index; i++) printf("%s", longest[i]); return 0;} int getline(char s[], int lim){ int c, i; for (i = 0; i lim-1 (c = getchar()) != EOF c!= \n ; ++i) s[i] = c; if (c == \n ) { s[i] = c; ++i; } s[i] = \0 ; return i;} void copy(char to[], char from[]){ int i; i = 0; while((to[i] = from[i]) != \0 ) ++i;} Exercise 1-17. Write a program to print all input lines that are longer than 80 characters. #include stdio.h #define MAXLINE 1000 int getline(char line[], int maxline); //pr1_17.c output line where length of line is over 80 characterint pr1_17(){ int len; int threshold; char line[MAXLINE]; threshold = 80; while((len = getline(line, MAXLINE)) 0) if(len threshold) { printf("%s", line); } return 0;} static int getline(char s[], int lim){ int c, i; for (i = 0; i lim-1 (c = getchar()) != EOF c!= \n ; ++i) s[i] = c; if (c == \n ) { s[i] = c; ++i; } s[i] = \0 ; return i;} Exercise 1-18. Write a program to remove trailing blanks and tabs from each line of input, and to delete entirely blank lines. #include stdio.h #define MAXLINE 1000 int getline(char line[], int maxline); //pr1_18 output line which removed trailing blancs and tabs from each line of input,// and output line which is no entirely blank lines.int pr1_18(){ int len; int i; char line[MAXLINE]; while((len = getline(line, MAXLINE)) 0) { for(i = len-1; (line[i] == || line[i] == \t || line[i] == \n ) i 0; i--) ; if(i 0 ) { line[i+1] = \n ; line[i+2] = \0 ; printf("%s", line); } } return 0;} static int getline(char s[], int lim){ int c, i; for (i = 0; i lim-1 (c = getchar()) != EOF c!= \n ; ++i) s[i] = c; if (c == \n ) { s[i] = c; ++i; } s[i] = \0 ; return i;} Exercise 1-19. Write a function reverse(s) that reverses the character string s. Use it to write a program that reverses its input a line at a time. #include stdio.h static enum { MAX_BUFF = 256 }; int length(char *str){ int nchar; nchar = 0; while(*str++ != \0 ) nchar++; return nchar;} int reverse(char *str){ int i,j,num; char revStr[MAX_BUFF]; //printf("%s", str); //printf("%d\n", length(str)); j = 0; for(i = length(str)-2; i = 0; i--) { revStr[j] = str[i]; j++; } revStr[j] = \n ; revStr[j+1] = \0 ; num = length(str); for(i = 0; i num; i++) { str[i] = revStr[i]; } return 0;} int pr1_19(){ int nc; char str[MAX_BUFF]; int ch; //printf("%d\n", MAX_BUFF); for(nc=0;(ch = getchar()) != EOF nc MAX_BUFF; nc++) { str[nc] = ch; if(ch == \n ) { str[nc+1] = \0 ; reverse(str); printf("%s", str); nc = -1; } } return 0;} Exercise 1-20. Write a program detab that replaces tabs in the input with the proper number of blanks to space to the next tab stop. Assume a fixed set of tab stops, say every n columns. Should n be a variable or a symbolic parameter? #include stdio.h int pr1_20(){ int ch; while((ch = getchar()) != EOF) { if(ch == \t ) { printf(" "); } else { putchar(ch); } } return 0;} Exercise 1-21. Write a program entab that replaces strings of blanks by the minimum number of tabs and blanks to achieve the same spacing. Use the same tab stops as for detab. When either a tab or a single blank would suffice to reach a tab stop, which should be given preference? #include stdio.h //entab that replaces strings of blanks by the minimum number of tabs and blanks to achieve the same spacing.int pr1_21(){ int ch; int nwh; int nt; int nb; int i; while((ch = getchar()) != EOF) { if(ch == ) { nwh = 1; while((ch = getchar()) == ch != EOF) { nwh++; } nt = nwh / 8; nb = nwh % 8; for(i = 0; i nt; i++) { printf("\t"); //printf("t"); } for(i = 0; i nb; i++) { printf(" "); //printf("w"); } } putchar(ch); }} Exercise 1-22. Write a program to ``fold long input lines into two or more shorter lines after the last non-blank character that occurs before the n-th column of input. Make sure your program does something intelligent with very long lines, and if there are no blanks or tabs before the specified column. #include stdio.h int pr1_22(){ int ch, n; int nc; n = 5; nc = 0; while((ch = getchar()) != EOF) { if(ch != ) { nc++; if(nc == n) { putchar( \n ); nc = 1; } } putchar(ch); } return 0;} Exercise 1-23. Write a program to remove all comments from a C program. Don t forget to handle quoted strings and character constants properly. C comments don t nest. #include stdio.h //skip commentint pr1_23(){ int ch; while((ch = getchar()) != EOF) { if(ch == / ) { ch = getchar(); if(ch == * ) { while((ch = getchar()) != * ch != EOF) ; while((ch = getchar()) != / ch != EOF) ; if(ch == / ) { ch = getchar(); } else { return 1; } } if(ch == / ) { while((ch = getchar()) != \n ch != EOF) ; if(ch == EOF) { return 1; } } } putchar(ch); } return 0;} Exercise 1-24. Write a program to check a C program for rudimentary syntax errors like unmatched parentheses,brackets and braces. Don t forget about quotes, both single and double, escape sequences, and comments. (This program is hard if you do it in full generality.) #include stdio.h int pr1_24(){ int ch; int parenthese_flag; int brackets_flag; int braces_flag; parenthese_flag = 0; brackets_flag = 0; braces_flag = 0; while((ch = getchar()) != EOF) { //check parenthese if(ch == ( ) { parenthese_flag++; } if(ch == ) ) { parenthese_flag--; } //check brachets if(ch == { ) { brackets_flag++; } if(ch == } ) { brackets_flag--; } //check braces if(ch == [ ) { braces_flag++; } if(ch == ] ) { braces_flag--; } //check comment if(ch == / ) { ch = getchar(); if(ch == * ) { while((ch = getchar()) != * ch != EOF) ; while((ch = getchar()) != / ch != EOF) ; if(ch == / ) { ch = getchar(); } else { return 1; } } if(ch == / ) { while((ch = getchar()) != \n ch != EOF) ; if(ch == EOF) { return 1; } } } //output //putchar(ch); } if(parenthese_flag != 0) { printf("unmatch parenthese\n"); return 1; } if(brackets_flag != 0) { printf("unmatch brackets\n"); return 1; } if(braces_flag != 0) { printf("unmatch braces\n"); return 1; } return 0;} test -- test (2009-11-03 10 50 44) 名前 コメント
https://w.atwiki.jp/tiscampaign/pages/426.html
最近新しく立ち上がった会社。 社員は現在4名。 社長の構想では総合技術派遣会社として活動する予定であるが、現在資金不足と人材不足により実現に至っていない。 現在は資金稼ぎの為、魔石取引と他会社への仕事斡旋を中心に様々な仕事を取り扱っている。